package com.test.designPattern.ch31;

/**
 * @ClassName FilterManager
 * @Description 创建过滤管理器。
 * @Author 维康
 * @Date 2018/7/2 17:09
 * @Version 1.0
 **/
public class FilterManager {

    FilterChain filterChain;

    public FilterManager(Target target){
        filterChain = new FilterChain();
        filterChain.setTarget(target);
    }
    public void setFilter(Filter filter){
        filterChain.addFilter(filter);
    }

    public void filterRequest(String request){
        filterChain.execute(request);
    }
}
